package com.example.grpc.client.rpc;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class Endpoint {
    private String serviceName;
    private int port;
    private String host = "localhost";
    
    public static Endpoint of(String serviceName, int port) {
        return new Endpoint(serviceName, port, "localhost");
    }
    
    public static Endpoint of(String serviceName, int port, String host) {
        return new Endpoint(serviceName, port, host);
    }
}